package com.qtong.controller.assignment;

import com.qtong.entity.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Placeholder controller for data crawling/import. Implementation left as TODO for the student.
 */
@RestController
@RequestMapping("/crawler")
public class CrawlerController {

    @PostMapping("/run")
    public Result runCrawler() {
        // TODO: implement crawling logic. For grading/demo, you can implement a separate script that writes JSON files and import them.
        return Result.success("Crawler endpoint received request — implement crawler or trigger job here (TODO)");
    }
}
